package com.hzit.aop.dao.impl;

import com.hzit.aop.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class UserDaoImpl implements UserDao {
	@Autowired
	private JdbcTemplate jdbcTemplate;

	//1. 修改账户余额
	@Override
	public void update(int uid1, int money) {
		jdbcTemplate.update("update user set balance=balance-? where uid=?",money,uid1);
	}
}
